﻿{template 'header', $module}
<div class="menu">
<table cellpadding="0" cellspacing="0">
<tr>
<td class="tab" id="my"><a href="mail.php"><span>My Subscriptions</span></a></td>
<td class="tab_nav">&nbsp;</td>
<td class="tab" id="list"><a href="mail.php?action=list"><span>Mailing List</span></a></td>
</tr>
</table>
</div>
{if $action == 'list'}
<div class="ls">
<table cellpadding="0" cellspacing="0" class="tb">
<tr>
<th width="40">&nbsp;</th>
<th>Heading</th>
<th>Category</th>
<th>Add Time</th>
</tr>
{loop $mails $k $v}
<tr onmouseover="this.className='on';" onmouseout="this.className='';" align="center">
<td><img src="{DT_STATIC}{$MODULE[2][moduledir]}/image/message_0.gif" width="16" height="16" alt=""/></td>
<td align="left"><a href="mail.php?action=show&itemid={$v[itemid]}" class="t">{$v[title]}</a></td>
<td>{$TYPE[$v['typeid']]['typename']}</td>
<td class="px11 f_gray" title="Updated {$v[editdate]}">{$v[adddate]}</td>
</tr>
{/loop}
</table>
</div>
<div class="pages">{$pages}</div>
<script type="text/javascript">s('mail');m('list');</script>
{elseif $action == 'show'}
<table cellspacing="1" cellpadding="6" class="tb">
<tr>
<td class="tl">Message header</td>
<td class="tr f_b">{$r[title]}</td>
</tr>
<tr>
<td class="tl">Message Body</td>
<td class="tr" style="line-height:180%;padding:10px;font-size:13px;">{$r[content]}</td>
</tr>
<tr>
<td class="tl">Add Time</td>
<td class="tr f_gray px11">{$r[adddate]}</td>
</tr>
<tr>
<td class="tl">Updated</td>
<td class="tr f_gray px11">{$r[editdate]}</td>
</tr>
</table>
<script type="text/javascript">s('mail');m('list');</script>
{else}
<form method="post" action="mail.php">
<table cellspacing="1" cellpadding="6" class="tb">
<tr>
<td class="tl">Subscribe to explain</td>
<td class="tr f_gray">
1、Select categories you are interested, you can click on subscribe will add to your registered e-mail subscription list, the system will periodically send subscriptions to your mailbox.<br/>
2、Cancel a category first remove its check (adding a category directly to select it), then click on subscribe to updates.<br/>
3、Click to unsubscribe, the system will cancel all of your subscriptions, and your email address removed from the subscription list.<br/>
4、Subscribe classification may be updated periodically, please feel free to attention.<br/>
5、If you can not receive the email, please <span class="f_blue">{$DT[mail_sender]}</span> Add to your whitelist。<br/>
</td>
</tr>
<tr>
<td class="tl"><span class="f_red">*</span> Business Category</td>
<td class="tr">
	{if $TYPE}
	<table cellspacing="2" cellpadding="3" width="100%">
	{loop $TYPE $k $v}
	{if $k%4==0}<tr>{/if}
	<td><input type="checkbox" name="typeids[]" value="{$v[typeid]}" id="type_{$v[typeid]}" {if in_array($v[typeid], $mytypeids)}checked{/if}/><label for="type_{$v[typeid]}"> {$v[typename]}</label></td>
	{if $k%4==3}</tr>{/if}
	{/loop}
	</table>
	{else}
	<span class="f_red">Unable to complete the subscription No business classification system</span>
	{/if}
</td>
</tr>
<tr>
<td class="tl">E-mail address</td>
<td class="tr"><strong>{$_email}</strong></td>
</tr>
{if $r}
<tr>
<td class="tl">Subscribe to Time</td>
<td class="tr">{$addtime}</td>
</tr>
<tr>
<td class="tl">Last updated</td>
<td class="tr">{$edittime}</td>
</tr>
{/if}
<tr>
<td class="tl"> </td>
<td class="tr" height="50"><input type="submit" name="submit" value=" Subscriptions " class="btn"/>&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value=" Unsubscribe " class="btn" onclick="if(confirm('Are you sure you want to cancel all subscriptions?')) Go('?action=cancel');"/></td>
</tr>
</table>
</form>
<script type="text/javascript">s('mail');m('my');</script>
{/if}
{template 'footer', $module}